package cn.com.shaom.learning.sb.security.example3;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * ClassName: MvcConfig
 * Description:
 * Date: 2017/12/27 14:42 【需求编号】
 *
 * @author Shaom
 * @version V1.0.0
 */
@Configuration
public class MvcConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/home").setViewName("/example3/home");
        registry.addViewController("/").setViewName("/example3/home");
        registry.addViewController("/hello").setViewName("/example3/hello");
        registry.addViewController("/login").setViewName("/example3/login");
    }
}
